VERSION 5.00
Begin VB.Form frmSkill_Tree 
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   5940
   ClientLeft      =   4515
   ClientTop       =   3330
   ClientWidth     =   5430
   LinkTopic       =   "Form1"
   Picture         =   "frmSkill_Tree.frx":0000
   ScaleHeight     =   5940
   ScaleWidth      =   5430
   ShowInTaskbar   =   0   'False
   Visible         =   0   'False
   Begin VB.PictureBox SpellBox 
      BorderStyle     =   0  'None
      Height          =   375
      Index           =   6
      Left            =   3240
      ScaleHeight     =   375
      ScaleWidth      =   375
      TabIndex        =   21
      Top             =   1680
      Width           =   375
   End
   Begin VB.PictureBox SpellBox 
      BorderStyle     =   0  'None
      Height          =   375
      Index           =   7
      Left            =   4680
      ScaleHeight     =   375
      ScaleWidth      =   375
      TabIndex        =   6
      Top             =   1680
      Width           =   375
   End
   Begin VB.PictureBox SpellBox 
      BorderStyle     =   0  'None
      Height          =   375
      Index           =   5
      Left            =   1800
      ScaleHeight     =   375
      ScaleWidth      =   375
      TabIndex        =   5
      Top             =   1680
      Width           =   375
   End
   Begin VB.PictureBox SpellBox 
      BorderStyle     =   0  'None
      Height          =   375
      Index           =   4
      Left            =   360
      ScaleHeight     =   375
      ScaleWidth      =   375
      TabIndex        =   4
      Top             =   1680
      Width           =   375
   End
   Begin VB.PictureBox SpellBox 
      BorderStyle     =   0  'None
      Height          =   375
      Index           =   3
      Left            =   4680
      ScaleHeight     =   375
      ScaleWidth      =   375
      TabIndex        =   3
      Top             =   240
      Width           =   375
   End
   Begin VB.PictureBox SpellBox 
      BorderStyle     =   0  'None
      Height          =   375
      Index           =   2
      Left            =   3240
      ScaleHeight     =   375
      ScaleWidth      =   375
      TabIndex        =   2
      Top             =   240
      Width           =   375
   End
   Begin VB.PictureBox SpellBox 
      BorderStyle     =   0  'None
      Height          =   375
      Index           =   1
      Left            =   1800
      ScaleHeight     =   375
      ScaleWidth      =   375
      TabIndex        =   1
      Top             =   240
      Width           =   375
   End
   Begin VB.PictureBox SpellBox 
      BorderStyle     =   0  'None
      Height          =   420
      Index           =   0
      Left            =   360
      ScaleHeight     =   420
      ScaleMode       =   0  'User
      ScaleWidth      =   375
      TabIndex        =   0
      Top             =   240
      Width           =   375
   End
   Begin VB.Label lblClose 
      BackStyle       =   0  'Transparent
      Height          =   375
      Left            =   1200
      TabIndex        =   24
      Top             =   5400
      Width           =   3375
   End
   Begin VB.Label LvlUp 
      BackStyle       =   0  'Transparent
      Caption         =   "+"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   7
      Left            =   4560
      TabIndex        =   23
      Top             =   2040
      Visible         =   0   'False
      Width           =   135
   End
   Begin VB.Label LvlUp 
      BackStyle       =   0  'Transparent
      Caption         =   "+"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   6
      Left            =   3120
      TabIndex        =   22
      Top             =   2040
      Visible         =   0   'False
      Width           =   135
   End
   Begin VB.Label LvlUp 
      BackStyle       =   0  'Transparent
      Caption         =   "+"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   5
      Left            =   1680
      TabIndex        =   20
      Top             =   2040
      Visible         =   0   'False
      Width           =   135
   End
   Begin VB.Label LvlUp 
      BackStyle       =   0  'Transparent
      Caption         =   "+"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   4
      Left            =   240
      TabIndex        =   19
      Top             =   2040
      Visible         =   0   'False
      Width           =   135
   End
   Begin VB.Label LvlUp 
      BackStyle       =   0  'Transparent
      Caption         =   "+"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   3
      Left            =   4560
      TabIndex        =   18
      Top             =   600
      Visible         =   0   'False
      Width           =   135
   End
   Begin VB.Label LvlUp 
      BackStyle       =   0  'Transparent
      Caption         =   "+"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   2
      Left            =   3120
      TabIndex        =   17
      Top             =   600
      Visible         =   0   'False
      Width           =   135
   End
   Begin VB.Label LvlUp 
      BackStyle       =   0  'Transparent
      Caption         =   "+"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   1
      Left            =   1680
      TabIndex        =   16
      Top             =   600
      Visible         =   0   'False
      Width           =   135
   End
   Begin VB.Label LvlUp 
      BackStyle       =   0  'Transparent
      Caption         =   "+"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   0
      Left            =   240
      TabIndex        =   15
      Top             =   600
      Visible         =   0   'False
      Width           =   135
   End
   Begin VB.Label SpellLbl 
      BackStyle       =   0  'Transparent
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   7
      Left            =   4440
      TabIndex        =   14
      Top             =   1920
      Width           =   255
   End
   Begin VB.Label SpellLbl 
      BackStyle       =   0  'Transparent
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   6
      Left            =   3000
      TabIndex        =   13
      Top             =   1920
      Width           =   255
   End
   Begin VB.Label SpellLbl 
      BackStyle       =   0  'Transparent
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   5
      Left            =   1560
      TabIndex        =   12
      Top             =   1920
      Width           =   255
   End
   Begin VB.Label SpellLbl 
      BackStyle       =   0  'Transparent
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   4
      Left            =   120
      TabIndex        =   11
      Top             =   1920
      Width           =   255
   End
   Begin VB.Label SpellLbl 
      BackStyle       =   0  'Transparent
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   3
      Left            =   4440
      TabIndex        =   10
      Top             =   480
      Width           =   255
   End
   Begin VB.Label SpellLbl 
      BackStyle       =   0  'Transparent
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   2
      Left            =   3000
      TabIndex        =   9
      Top             =   480
      Width           =   255
   End
   Begin VB.Label SpellLbl 
      BackStyle       =   0  'Transparent
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   1
      Left            =   1560
      TabIndex        =   8
      Top             =   480
      Width           =   255
   End
   Begin VB.Label SpellLbl 
      BackStyle       =   0  'Transparent
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   0
      Left            =   120
      TabIndex        =   7
      Top             =   480
      Width           =   255
   End
End
Attribute VB_Name = "frmSkill_Tree"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()

Dim Z As Long
Dim i As Long
        
        
frmSkill_Tree.Icon = LoadPicture(App.Path & "\data files\graphics\small.ico")

If GetPlayerClass(MyIndex) = 0 Then
'Dark Knight
        frmLoad.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\PlayerChat.jpg")
        
   'load the spells
        Z = 1
        If Player(MyIndex).SpellLevel(Z) = 0 Then
        'If GetPlayerSpellLevel(MyIndex, Z) = 0 Then
        frmSkill_Tree.SpellLbl(0).Caption = "" & Player(MyIndex).SpellLevel(Z)
        frmSkill_Tree.SpellBox(0).Picture = LoadPicture(App.Path & "\data files\graphics\spellicons\1.bmp")
        End If
        
        'Z = 2
        'If GetPlayerSpellLvl(MyIndex, Z) = 0 Then
        'frmSkill_Tree.SpellLbl(1).Caption = "" & GetPlayerSpellLvl(MyIndex, Z)
        'frmSkill_Tree.SpellBox(1).Picture = LoadPicture(App.Path & "\data files\graphics\spellicons\2.bmp")
        'End If
        
        Z = 3
        If Player(MyIndex).SpellLevel(Z) = 0 Then
        frmSkill_Tree.SpellLbl(3).Caption = "" & Player(MyIndex).SpellLevel(Z)
        frmSkill_Tree.SpellBox(3).Picture = LoadPicture(App.Path & "\data files\graphics\spellicons\3.bmp")
        End If
        
Call ShowLvlUp
       
    
    
    
    
Else
End If




End Sub


Private Sub lblClose_Click()
'close button
frmSkill_Tree.Visible = False
End Sub

Private Sub LvlUp_Click(Index As Integer)
    Dim Zslot
    Dim Z As Long
    Zslot = Index
    
    '--------------------
    If GetPlayerClass(MyIndex) = 0 Then 'Dark Knight
        If Zslot = 0 Then
            Z = 1 '<--- Spell num goes here.
        End If
        If Zslot = 1 Then
            Z = 2
        End If
        If Zslot = 2 Then
            Z = 3
        End If
        If Zslot = 3 Then
            Z = 4
        End If
        
        Call UseSkillPoint(Z)
        Player(MyIndex).SpellLevel(Z) = Player(MyIndex).SpellLevel(Z) + 1
        Call SetPlayerSkillPoints(MyIndex, GetPlayerSkillPoints(MyIndex) - 1)
        Call ShowLvlUp
           
    Else
    End If
    '---------------------
    If GetPlayerClass(MyIndex) = 1 Then 'Other (template)
        If Zslot = 0 Then
            Z = 0
        End If
        If Zslot = 1 Then
            Z = 1
        End If
           
        'Call SetPlayerSpellLvl(MyIndex, Z, GetPlayerSpellLvl(MyIndex, Z) + 1)
        Call SetPlayerSkillPoints(MyIndex, GetPlayerSkillPoints(MyIndex) - 1)
        Call ShowLvlUp
           
    Else
    End If
    '----------------------
        
    
End Sub

Sub ShowLvlUp()

  'load the '+' only if skill points are availible
    For i = 0 To 7
    If GetPlayerSkillPoints(MyIndex) > 0 Then
    frmSkill_Tree.LvlUp(i).Visible = True
    Else
    frmSkill_Tree.LvlUp(i).Visible = False
    End If
    Next
       
End Sub
